Derivations of equations of motion by graphical method